'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
exports.myAxios = undefined;

var _axiosMin = require('../../node_modules/axios/dist/axios.min.js');

var _axiosMin2 = _interopRequireDefault(_axiosMin);

var _lodash = require('../../node_modules/lodash/lodash.js');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * axios 实例生成器
 * created by wjxu on 2017-02-20T14:18:07+0800
 * @return {axios} axios的实例
 */
function createAxios(ax) {
    return function () {
        var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

        return ax.create((0, _lodash.defaultsDeep)({
            baseURL: 'http://localhost/mythumb/',
            timeout: 30000
        }, opts));
    };
}
var myAxios = createAxios(_axiosMin2.default);

exports.myAxios = myAxios;